<template>
  <div style="height: 100px; width: 100%; background: cornflowerblue;">
    这是组件B
    <div>我的名字：{{resturantName}}</div>
  </div>
</template>

<script>
  import {mapActions, mapGetters} from 'vuex'

  export default {
    name: "coma",
    computed: {
      ...mapGetters(['resturantName']) // 动态计算属性，相当于this.$store.getters.resturantName
    }
  }
</script>

<style scoped>

</style>
